/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.ec.channel.entity.Channel
   Module Description   :

   Date Created      : 2010/7/5
   Original Author   : feeling
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.ec.channel.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.NamedQuery;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * @author feeling
 * 
 */
@Entity
@Table(name = "EC_ACT_CHANNEL")
@NamedQuery(name = "Channel.checkAvailableChannel", query = "from Channel where id = :channelId and sysdate between startDate and endDate")
public class Channel extends BaseEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = -5752182436888516222L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_act_channel")
	@SequenceGenerator(name = "seq_ec_act_channel", sequenceName = "SEQ_EC_ACT_CHANNEL")
	@Column(name = "ID")
	private Long id;

	@Column(name = "CHANNEL_NAME", length = 30, nullable = false)
	private String channelName;

	@Column(name = "ACT_TYPE", length = 30, nullable = false)
	private String actType;

	@Column(name = "ACT_NAME", length = 30, nullable = false)
	private String actName;

	@Column(name = "ACT_URL", length = 200)
	private String actUrl;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "START_DATE", nullable = false)
	private Date startDate;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "END_DATE", nullable = false)
	private Date endDate;

	@Column(name = "CHANNEL_STATUS", length = 1)
	private String channelStatus;

	public String getActName() {
		return actName;
	}

	public String getActType() {
		return actType;
	}

	public String getActUrl() {
		return actUrl;
	}

	public String getChannelName() {
		return channelName;
	}

	public String getChannelStatus() {
		return channelStatus;
	}

	public Date getEndDate() {
		return endDate;
	}

	public Long getId() {
		return id;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setActName(String actName) {
		this.actName = actName;
	}

	public void setActType(String actType) {
		this.actType = actType;
	}

	public void setActUrl(String actUrl) {
		this.actUrl = actUrl;
	}

	public void setChannelName(String channelName) {
		this.channelName = channelName;
	}

	public void setChannelStatus(String channelStatus) {
		this.channelStatus = channelStatus;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
}